//
//  XFYAnimationTool.h
//  SDKSample
//
//  Created by 小肥羊 on 15/11/17.
//  Copyright © 2015年 Zhu‘s Game House. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef enum : NSUInteger {
    XFYAnimationTypeFade = 1,                   /**< 淡入淡出 */
    XFYAnimationTypePush,                       /**< 推挤 */
    XFYAnimationTypeReveal,                     /**< 揭开 */
    XFYAnimationTypeMoveIn,                     /**< 覆盖 */
    XFYAnimationTypeCube,                       /**< 立方体 */
    XFYAnimationTypeSuckEffect,                 /**< 吮吸 */
    XFYAnimationTypeOglFlip,                    /**< 翻转 */
    XFYAnimationTypeRippleEffect,               /**< 波纹 */
    XFYAnimationTypePageCurl,                   /**< 翻页 */
    XFYAnimationTypePageUnCurl,                 /**< 反翻页 */
    XFYAnimationTypeCameraIrisHollowOpen,       /**< 开镜头 */
    XFYAnimationTypeCameraIrisHollowClose,      /**< 关镜头 */
} AnimationType;

@interface XFYAnimationTool : NSObject

/*! @brief 获取单例 */
+ (XFYAnimationTool *)sharedAnimationTool;



#pragma mark - CATransition动画实现
- (void)animationWithView:(UIView *)view Type:(AnimationType)type FromType:(NSString *)fromType;
- (void)animationWithView:(UIView *)view Type:(AnimationType)type FromType:(NSString *)fromType PlayTime:(NSTimeInterval)playTime;
#pragma UIView实现动画
- (void)animationWithView:(UIView *)view AnimationTransition:(UIViewAnimationTransition)transition;
- (void)animationWithView:(UIView *)view AnimationTransition:(UIViewAnimationTransition)transition PlayTime:(NSTimeInterval)playTime DelayTime:(NSTimeInterval)delayTime;
#pragma mark - 制定剧本
- (CAAnimationGroup *)xfyAnimationWithView:(UIView *)view;
- (CAAnimationGroup *)openAnimationWithView:(UIView *)view;
- (CAAnimationGroup *)pushAnimationWithView:(UIView *)view;

@end
